﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Web.Mvc;
namespace JULONG.WEB.Library
{
    using expViewResult;

    public class myViewResult
    {
        /// <summary>
        /// 404错误
        /// </summary>
        /// <returns></returns>
        public static ViewResult notFound()
        {
            return new NotFoundResult();
        }

        /// <summary>
        /// json返回
        /// </summary>
        /// <param name="status">t为成功 f为失败</param>
        /// <param name="content">内容</param>
        /// <param name="action">后续处理</param>
        /// <returns></returns>
        public static JsonResult json(bool status = true, object content = null, resultActionEnum action = resultActionEnum.none)
        {
            if (status)
            {
                return myJson.success(content, action);
            }
            return myJson.error(content, action);
        }
    }
}
